using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Publish_Authentic : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string authentic = "";

        RandomHelper rh = new RandomHelper();
        authentic = rh.GenerateRandomCode();

        Session["authentic"] = authentic;

        AuthenticImage ai = new AuthenticImage(authentic, 80, 20, "Century Schoolbook");

        // Change the response headers to output a JPEG image.
        this.Response.Clear();
        this.Response.ContentType = "image/jpeg";

        // Write the image to the response stream in JPEG format.
        ai.Image.Save(this.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);

        // Dispose of the CAPTCHA image object.
        ai.Dispose();
    }
}
